import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Test3 {
    public static void main(String[] args) {
        ArrayList<String> manlist=new ArrayList<>();
        ArrayList<String> womenlist=new ArrayList<>();
        //2.添加数据
        Collections.addAll(manlist,"蔡虎，23","爱吃的，79","防黑客，45","阿达，23");
        Collections.addAll(womenlist,"西安，67","姑获鸟，45","故好看，38","环境，24");
        //男演员筛选
        Stream<String> stream = manlist.stream()
                .filter(s -> s.split(",")[0].length() == 3)
                .limit(2);
        //女演员
        Stream<String> stream2 = womenlist.stream()
                .filter(s -> s.split(",")[0].startsWith("故"))
                .skip(1);

        List<Actor> list = Stream.concat(stream, stream2)
                .map(s -> new Actor(s.split(",")[0], Integer.parseInt(s.split(",")[1])))
                .collect(Collectors.toList());
        System.out.println(list);
    }
}
